﻿namespace eg_006_结构体
{
    internal class Program
    {
        struct Rectangle
        {
            public int RecHight;
            public int RecWeight;
            public bool IsSquare() { return RecHight == RecWeight; }
        }
        static void Main(string[] args)
        {
            Rectangle rect = new Rectangle();
            rect.RecHight = 100;
            rect.RecWeight = 200;
            bool isSquare = rect.IsSquare();
            Console.WriteLine("矩形是否为正方形：{0}", isSquare);

        }
    }
}